// Factorial.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <stdio.h>

int factorial(int n)
{
	if (n<=1)
		return 1;
	else
		return n*factorial(n-1);
}

int _tmain(int argc, _TCHAR* argv[])
{
	int n,nr;
	printf("vvedite n  ");
	scanf("%d",&n);
	nr=factorial(n);
	printf("%d",nr);
	return 0;
}

